﻿<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
    version="1.0" xmlns:date="http://exslt.org/dates-and-times"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    exclude-result-prefixes="xsl x date">

	<xsl:import href="PrevNext.xsl"/>

	<xsl:output omit-xml-declaration="yes" method="html"/>

	<xsl:param name="ItemsPerPage"/>
	<xsl:param name="qs-Page" />

	<xsl:template match="/">

		<xsl:call-template name="PrevNext">
			<xsl:with-param name="allItems" select="rows/row" />
		</xsl:call-template>

		<xsl:call-template name="SelectCurrentItems">
			<xsl:with-param name="allItems" select="rows/row" />
		</xsl:call-template>

	</xsl:template>

	<xsl:template match="row">

		<xsl:variable name="articleDate" select="date:parseDate(ArticleDate, 'yyyy-MM-dd HH:mm:ss')"/>

		<div class="newsArticleItem ">
			<a href="/{substring-after(FileRef, '#')}">
				<h3>
					<xsl:value-of select="Title" disable-output-escaping="yes"/>
				</h3>
			</a> &#160;&#160;&#160;&#160; <xsl:value-of select="date:formatDate($articleDate, 'dd MMMM yyyy')"/><br/>
			<xsl:value-of select="PublishingRollupImage" disable-output-escaping="yes"/>

			<div>
				<xsl:value-of select="ArticleSynopsis" />
			</div>
		</div>

	</xsl:template>

</xsl:stylesheet>
